package com.mo;

import com.mo.ext.Face;

import java.util.Iterator;
import java.util.Scanner;
import java.util.ServiceConfigurationError;
import java.util.ServiceLoader;

/**
 * @author moon.pan
 * @program mo-all
 * @apiNote
 * @since 2022/3/21
 */
public class ServiceLoaderDemo {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        while (scanner.hasNextLine()) {
            scanner.nextLine();
            System.out.println(66.8);

            ServiceLoader<Face> load = ServiceLoader.load(Face.class);
            Iterator<Face> iterator = load.iterator();
            while (iterator.hasNext()) {
                try {
                    iterator.next();
                } catch (ServiceConfigurationError e) {
                }
            }
        }
    }
}
